'use client'

import { SessionProvider } from 'next-auth/react'
import { useSessionActivity } from '@/hooks/useSessionActivity'
import { Toaster } from 'react-hot-toast'

// 活动跟踪组件
function ActivityTracker() {
  useSessionActivity();
  return null;
}

export default function ClientSessionProvider({ 
  children 
}: { 
  children: React.ReactNode 
}) {
  return (
    <SessionProvider>
      <ActivityTracker />
      <Toaster position="top-right" />
      {children}
    </SessionProvider>
  )
} 